import type { Component } from 'vue'
import { 
  Document, 
  Link, 
  Timer, 
  Edit, 
  Promotion, 
  Key, 
  CircleCheck, 
  Position,
  Calendar
} from '@element-plus/icons-vue'

export interface Tool {
  id: string
  name: string
  description: string
  icon: Component
  path: string
  category: string
}

// 导入图标
import jsonIcon from '@/assets/tool-icons/json.png'
import xmlIcon from '@/assets/tool-icons/xml.png'
import base64Icon from '@/assets/tool-icons/base64.png'
import md5Icon from '@/assets/tool-icons/md5.png'
import uuidIcon from '@/assets/tool-icons/uuid.png'
import guidIcon from '@/assets/tool-icons/guid.png'
import unixTimeIcon from '@/assets/tool-icons/unix-time.png'
import urlIcon from '@/assets/tool-icons/url.png'
import unicodeIcon from '@/assets/tool-icons/unicode.png'
import calendarIcon from '@/assets/tool-icons/calendar.png'

export const tools: Tool[] = [
  {
    id: 'calendar',
    name: '日历待办',
    description: '简单高效的日程管理工具',
    icon: calendarIcon,
    path: '/tools/calendar',
    category: 'productivity'
  },
  {
    id: 'code-diff',
    name: '代码对比',
    description: '差异对比/合并',
    icon: Document,
    path: '/tools/code-diff',
    category: 'dev'
  },
  {
    id: 'unix-time',
    name: 'Unix时间互转',
    description: '时间戳转换',
    icon: unixTimeIcon,
    path: '/tools/unix-time',
    category: 'dev'
  },
  {
    id: 'url-codec',
    name: 'URL编解码',
    description: 'URL转换工具',
    icon: urlIcon,
    path: '/tools/url',
    category: 'dev'
  },
  {
    id: 'base64',
    name: 'Base64加解器',
    description: '编码解码工具',
    icon: base64Icon,
    path: '/tools/base64',
    category: 'dev'
  },
  {
    id: 'md5',
    name: 'MD5加密',
    description: '信息摘要算法',
    icon: md5Icon,
    path: '/tools/md5',
    category: 'dev'
  },
  {
    id: 'unicode',
    name: 'Unicode中文互转',
    description: '中文编码转换',
    icon: unicodeIcon,
    path: '/tools/unicode',
    category: 'dev'
  },
  {
    id: 'uuid',
    name: 'UUID生成器',
    description: '唯一标识生成',
    icon: uuidIcon,
    path: '/tools/uuid',
    category: 'dev'
  },
  {
    id: 'guid',
    name: 'GUID生成器',
    description: '全局唯一标识',
    icon: guidIcon,
    path: '/tools/guid',
    category: 'dev'
  },
  {
    id: 'camel-case',
    name: '驼峰下划线互转',
    description: '变量名转换',
    icon: Position,
    path: '/tools/camel-case',
    category: 'dev'
  }
]

// 工具分类
export const categories = [
  {
    id: 'productivity',
    name: '效率工具',
    icon: Calendar,
    tools: tools.filter(tool => tool.category === 'productivity')
  },
  {
    id: 'dev',
    name: '开发工具',
    icon: Document,
    tools: tools.filter(tool => tool.category === 'dev')
  },
  {
    id: 'encode',
    name: '编码转换',
    icon: Edit,
    tools: tools.filter(tool => tool.category === 'encode')
  }
] 